# def wrapper(func):
#     def inner(*args,**kwargs):
#         print("开始")
#         result = func(*args,**kwargs)
#         print("结束")
#         return result
#     return inner
#
# @wrapper
# def func(*args,**kwargs):
#     print("func")
#     return 1
#
# func()
#
#
# def x1(func):
#     def inner(*args, **kwargs):
#         print('调用原函数之前')
#         data = func(*args, **kwargs)  # 执行原函数并获取返回值
#         print('调用员函数之后')
#         return data
#
#     return inner
#
#
# @x1
# def index():
#     print(123)
#
#
# index()


LIST = [lambda x:x for x in range(10)]
print(LIST[5](3))

v = [lambda :x+10 for x in range(10)]
result = v[3]()
print(result)


# 生成器函数
def func():
    yield 1
    yield 2
# 生成器
v1 = func()
print(v1)






